Object Closure Conversion

نویسنده

  • Neal Glew
چکیده

An integral part of implementing functional languages is closure conversion—the process of converting code with free variables into closed code and auxiliary data structures. Closure conversion has been extensively studied in this context, but also arises in languages with first-class objects. In fact, one variant of Java’s inner classes are an example of objects that need to be closure converted, and the transformation for converting these inner classes into Java Virtual Machine classes is an example of closure conversion. This paper argues that a direct formulation of object closure conversion is interesting and gives further insight into general closure conversion. It presents a formal closure-conversion translation for a second-order object language and proves it correct. The translation and proof generalise to other object-oriented languages, and the paper gives some examples to support this statement. Finally, the paper discusses the well known connection between function closures and single-method objects. This connection is formalised by showing that an encoding of functions into objects, object closure conversion, and various object encodings compose to give various closure-conversion translations for functions.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Categorical and Graphical Treatment of Closure Conversion

This paper gives a formal basis for the closure conversion phase of functional programming languages with imperative features, using a graphical semantics for the language. We present normal forms of graphs, one corresponding to procedural languages, and one corresponding to object-oriented languages. Using closure conversion, we can prove normalization results for both normal forms. Thus, we o...

متن کامل

Typed Closure Conversion for Recursively-deened Functions (extended Abstract)

Much recent work on the compilation of statically typed languages such as ML relies on the propagation of type information from source to object code in order to increase the reliability and maintainabilty of the compiler itself and to improve the eeciency and veriiability of generated code. To achieve this the program transformations performed by a compiler must be cast as type-preserving tran...

متن کامل

3D Scene and Object Classification Based on Information Complexity of Depth Data

In this paper the problem of 3D scene and object classification from depth data is addressed. In contrast to high-dimensional feature-based representation, the depth data is described in a low dimensional space. In order to remedy the curse of dimensionality problem, the depth data is described by a sparse model over a learned dictionary. Exploiting the algorithmic information theory, a new def...

متن کامل

Combining Closure Conversion with Closure Analysis using Algebraic Types

We have developed a new approach to typed closure conversion of higher-order monomorphic languages which also provides a useful uniform framework for closure analysis and subsequent optimization. The approach is based on representing closures as ordinary algebraic data constructors, grouped into algebraic datatypes according to source type; no special type system is needed. Closure applications...

متن کامل

Ownership conversion and closure in the nursing home industry.

Ownership conversions and closures in the nursing home literature have largely been treated as separate issues. This paper studies the predictors of nursing home ownership conversions and closure in a common framework after the implementation of the Prospective Payment System in Medicare skilled nursing facilities. The switch in reimbursement regimes impacted facilities with greater exposure to...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Electr. Notes Theor. Comput. Sci.

دوره 26  شماره 

صفحات  -

تاریخ انتشار 1999